From af335486c659fb6f5d065eb61014074045e4e81d Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 19 Nov 2023 15:11:27 +0000 Subject: Generate Patio code for try statements --- ...mpiler.testing.snapshots.Snapshotter)].expected | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected (limited to 'snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected') diff --git a/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected new file mode 100644 index 00000000..71389f44 --- /dev/null +++ b/snapshots/[engine:junit-jupiter]/[class:org.shedlang.compiler.patio.PatioCodeGenTryTests]/[method:canGenerateCodeForTry(org.shedlang.compiler.testing.snapshots.Snapshotter)].expected @@ -0,0 +1,39 @@ +Compilation unit elements: + +( + function-decl + "shed__runtime__effects_push_handler" + params=((param "effectTag" int)) + return-type=data-ptr +) +( + function-decl + "shed__runtime__effects_set_handler_method" + params=((param "handler" data-ptr) (param "methodIndex" int) (param "handlerMethod" int)) + return-type=void +) +( + function-decl + "shed__runtime__effects_pop_handler" + params=() + return-type=void +) + +Locals: + * (val "effectHandler__0" data-ptr) + * (val "tmp__0" int) + +Instructions: + +( + (call (local "effectHandler__0") "shed__runtime__effects_push_handler" ((int 0))) + (call _ "shed__runtime__effects_set_handler_method" ((local "effectHandler__0") (int 0) (local "handlerC"))) + (call _ "shed__runtime__effects_set_handler_method" ((local "effectHandler__0") (int 1) (local "handlerA"))) + (call _ "shed__runtime__effects_set_handler_method" ((local "effectHandler__0") (int 2) (local "handlerB"))) + (local-store (local "tmp__0") (int 42)) + (call (local "effectHandler__0") "shed__runtime__effects_pop_handler" ()) +) + +Temporary stack: + * tmp__0 + * other -- cgit v1.2.3